﻿@using AfrikDotnetWebSite.Models;
@model IEnumerable<Project>

@{
    ViewBag.Title = "Projects";
}

<div class="projects cf">
    <div class="large-pane float-left">
        <h2>Projects</h2>
        <div class="list">
            @if (Model.Count() > 0)
            {
                foreach (Project p in Model)
                {
                <div class="box cf">
                    <div class="float-left">
                        @if (!String.IsNullOrWhiteSpace(p.Image)) { 
                            <img class="img" alt="@p.Title" src="~/static/img/projects/@p.Image" />                        
                        }
                    </div>
                     <div class="float-left">
                         <h2>@p.Title</h2>
                         <p>@p.Description</p>
                            <a href="@p.Link" target="_blank">» Project page</a>
                    </div>
                </div>
                }
            }
            else { 
                <text>Coming soon!</text>
            }
        </div>
    </div>
    <div class="small-pane float-right">
        @Html.Partial("_SidePane")
     </div>
</div>